package com.zkingsoft.web.dao;

import com.matrix.core.pojo.PaginationVO;
import com.zkingsoft.web.bean.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @description (产品表)
 * @author 姜友瑶
 * @date 2018-12-12 13:44
 */
public interface ProductDao{

	public int insert(@Param("item") Product product);
   	
   	public int batchInsert(@Param("list") List<Product> productList);
   	
	public int updateByMap(Map<String, Object> modifyMap);
	
	public int updateByModel(@Param("record")Product product);
	
	public int deleteByIds(@Param("list") List<String> list);
	
	public int deleteById(String id);

	public int deleteByModel(@Param("record") Product product);
	
	public List<Product> selectInPage(@Param("record") Product product, @Param("pageVo") PaginationVO pageVo);

	public List<Product> selectByModel(@Param("record") Product product);
	
	public int selectTotalRecord(@Param("record") Product product);
	
	public Product  selectById(String id);
	
	public Product  selectForUpdate(String id);

	public List<Product> selectBYCodeOrName(@Param("companyId")String companyId, @Param("code")String code,
											 @Param("name")String name,
			@Param("pageSize")Integer pageSize, @Param("offset")Integer offset);
	
	public int selectCountBYCodeOrName(@Param("companyId")String companyId, @Param("code")String code, @Param("name")String name);
	
}